Cubetest Demo
by JJ Robinson II
http://www.geocities.com/mkia1/
hrtbreak.deathtospam@swbell.net
(remove spam reference to contact me)

5-22-2002

(c) JJ Robinson II, all rights reserved

This is a demonstration of the basics of real-time animation techniques for DirectX 8.1.  Included are vertex tweening (keyframing), 
vertex buffers, vertex shaders, fixed-function processing, and various other things.  It is primarily an extract from my 3D game engine's
device-dependent library with a simple hand-coded cube in place of the model importer from the DI part of the engine.  

Source code is included.  You may use excerpts from the code in your own work.  If you use the application or code in substantially 
complete and unmodified form, I expect to be cited as the author.

You will need DX 8.1 runtimes installed (not included) to run this.  It's hard-coded to run in a 1024x768 window.  It will run on a fair range 
of video cards:  I can run it on my old ATI Rage Pro and Rage Pro LT 8Mb cards with a 3rd party driver and 16-bit color (in HAL but with 
s/w vertex processing), for example.  It also runs on the software reference rasterizer, but it's pathetically slow.

This is a programming demo, submitted for instructive (and resume) purposes without any support or promises whatsoever.  

4-29-2003

I finally realized that TweenFactor was declared double, and that truncation was preventing the animation from tweening properly.  I changed 
it to float, and cleaned up the tweening logic so that a smooth animation between the two keyframes results.  The logic is hard-coded to 20fps.  

Next fix is to accomodate programmable and software pipelines.  The fixed-function logic probably only works on ATI cards presently, 
and this situation will only get worse with DX9+.  This extremely simple, two-point keyframed animation is a reasonable place to hassle this out.

Links, Refences:

microsoft.public.win32.programmer.directx.graphics